<?php
use Yii\helpers\Html;
use yii\helpers\Url;
use backend\components\SideNavWidget;
?>
<div class="col-md-2">
<?php
    //左侧菜单
    
    $menuItem = [];
    if ($access = Yii::$app->params['access']) {
        isset($access['COURSE']['INDEX']) && $menuItem[] = ['label' => '课程管理', 'url' => ['/course/index']];
        isset($access['COURSE']['LIVE']) && $menuItem[] = ['label' => '直播管理', 'url' => ['/course/live']];
        isset($access['COURSE']['QUES']) && $menuItem[] = ['label' => '问答管理', 'url' => ['/course/ques']];
        isset($access['COURSE']['EVALUATE']) && $menuItem[] = ['label' => '评价管理', 'url' => ['/course/evaluate']];
        isset($access['COURSE']['TYPE']) && $menuItem[] = ['label' => '分类管理', 'url' => ['/course/type']];
    } else {
        $menuItem = [
            ['label' => '课程管理', 'url' => ['/course/index']],
            ['label' => '直播管理', 'url' => ['/course/live']],
            ['label' => '问答管理', 'url' => ['/course/ques']],
            ['label' => '评价管理', 'url' => ['/course/evaluate']],
            ['label' => '分类管理', 'url' => ['/course/type']],
        ];
    }
    
    
    echo SideNavWidget::widget([
        'options' => ['class' => 'list-group'],
        'items' => $menuItem,
    ]);

    
    ?>
</div>